﻿package com.vigmonk.utils{
	import flash.events.StatusEvent;	import flash.net.LocalConnection;	
	/**	 * 	 * Debugger.as	 * @author VIGMONK	 * 	 */	 	/**	 * 	 * import classes.utils.Debugger;	 * 	 * private var debugger:Debugger;	 * 	 * debugger = Debugger.getInstance();	 * debugger.tr('Trace');	 * 	 */		public class Debugger	{		private var localCon:LocalConnection;		private static var instance:Debugger;		public function Debugger():void		{			if(localCon==null) {				localCon = new LocalConnection();				localCon.addEventListener(StatusEvent.STATUS, onStatus);			}		}				public static function getInstance():Debugger		{			if(instance==null) instance = new Debugger();			return instance;			}		public function tr(..._rest):void		{			var str:String = _rest.join(' , ');				trace(str);			localCon.send('localhost:test', 'tr', str);		}				private static function onStatus(_e:StatusEvent):void{}			}
}
